import React from 'react'
import PropTypes from 'prop-types'
import { Row, Col, Icon } from 'antd'
import style from './Clock.less'

const Clock = ({
  changeTime,
  currentTime,
}) => {
  let t = setTimeout(() => {
    changeTime()
  }, 60000)
  return (
    <div className={style.Clock}>
      <div className={style.gutter}>
        <Icon type="clock-circle-o" style={{ fontSize: 20, color: 'rgb(248, 200, 46)' }} />
      </div>
      <div className={style.gutter}>
        {currentTime[0]}
      </div>
      <div className={style.gutter}>
        {currentTime[1]}
      </div>
      <div className={style.gutter}>
        {currentTime[2]}
      </div>
    </div>
  )
}

Clock.propTypes = {
  changeTime: PropTypes.func,
  currentTime: PropTypes.array,
}

export default Clock
